package com.vincent.template.domain;

import com.vincent.template.commons.base.BaseUuidEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * 部门
 * @Author Vincent Wang
 * @Date 2020/10/19 13:34
 */
@Entity
@Table(name = "biz_department",
        uniqueConstraints = @UniqueConstraint(name = "departmentNo_unique", columnNames = {"departmentNo"}),
        indexes = @Index(name = "parentNo_idx", columnList = "parentNo"))
public class BizDepartmentPo extends BaseUuidEntity {

    /**
     * 部门编号
     */
    @Column(nullable = false)
    private Long departmentNo;

    /**
     * 父级部门编号
     */
    @Column(nullable = false)
    private Long parentNo;

    /**
     * 部门名称
     */
    @Column(nullable = false, length = 128)
    private String departmentName;

    /**
     * 部门全路径名称
     */
    @Column(nullable = false)
    private String departmentFullName;

    /**
     * 部门类型
     */
    @Column(nullable = false, length = 32)
    private String departmentType;

    /**
     * 部门负责人员工ID
     */
    @Column(length = 40)
    private String headStaffId;

    public Long getDepartmentNo() {
        return departmentNo;
    }

    public void setDepartmentNo(Long departmentNo) {
        this.departmentNo = departmentNo;
    }

    public Long getParentNo() {
        return parentNo;
    }

    public void setParentNo(Long parentNo) {
        this.parentNo = parentNo;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public String getDepartmentFullName() {
        return departmentFullName;
    }

    public void setDepartmentFullName(String departmentFullName) {
        this.departmentFullName = departmentFullName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getDepartmentType() {
        return departmentType;
    }

    public void setDepartmentType(String departmentType) {
        this.departmentType = departmentType;
    }

    public String getHeadStaffId() {
        return headStaffId;
    }

    public void setHeadStaffId(String headStaffId) {
        this.headStaffId = headStaffId;
    }
}
